<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <title>Thinkphp数据库在线备份下载和还原</title>
        <link rel="stylesheet" type="text/css" href="http://www.sucaihuo.com/jquery/css/common.css" />

    </head>
    <body>
        <div class="head">

        </div>
        <div class="container">
            <div class="demo">
                <table class="table_parameters" border="0" cellSpacing="0" cellPadding="0" width="100%">
                    <tbody>
                        <tr class="tr_head">
                            <th width="40px">序号</th>
                            <th>文件名</th>
                            <th width="150px">备份时间</th>
                            <th width="130px">文件大小</th>
                            <th width="100px">操作</th>

                        </tr>
                        {notempty  name="lists"}

                            {foreach name="lists" key="key" item="row"}
                                {if condition="$key gt 1"}
                                    <tr>

                                        <td>{$key-1}</td>
                                        <td style="text-align: left"><a href="{:U('GetDb/down',array('Action'=>'download','file'=>$row))}">{$row}</a></td>
                                        <td></td>
                                        <td></td>
                                        <td>
                                            <a href="{:U('GetDb/down',array('name'=>$row))}">下载</a>
                                            <a onclick="return confirm('确定将数据库还原到当前备份吗？')"href="{:U('Bak/index',array('Action'=>'RL','File'=>$row))}">还原</a>
                                            <a onclick="return confirm('确定删除该备份文件吗')"
											href="{:U('GetDb/del',array('name'=>$row))}">删除</a>
                                        </td>
                                    </tr>
                                {/if}
                            {/foreach}
                            {else/}
                            <tr>
                                <td colspan="7">没有找到相关数据。</td>
                            </tr>

                        {/notempty}
                    </tbody>
                </table>
                <p>  			
                    <a class="btn" href ="{:U('GetDb/backup')}">备份添加</a>
                </p>
            </div>
        </div>


    </body>
</html>